import axios from 'axios';
import useAxios from '../utils/axios';

const BASE_URL = window.CONFIG.baseUrl;

export const getUsers = () => {
    return axios.get(`${BASE_URL}/administrateur/checktostu`);
};

export const uselogin = (data) => {
    return axios.post(`${BASE_URL}/student/login`,{
        studentid: data.get('email'),
        password: data.get('password')
    });
};

export const getstuinfo = (data) => {
    return axios.get(`${BASE_URL}/studentinfo/glstudentinfo`);
};
export const getcardlist = (data) => {
    return axios.get(`${BASE_URL}/dynamique/getlist`);
};
export const Cdystate = (data) => {
    return axios.post(`${BASE_URL}/dynamique/Cdystate`,data);
};
export const chtimer = (data) => {
    return axios.post(`${BASE_URL}/dynamique/chtimer`,data);
};
export const getRoomCount = (data) => {
    return axios.post(`${BASE_URL}/room/getroomCount`,data);
};
export const getRoomOrder = (data) => {
    return axios.post(`${BASE_URL}/room/getRoomOrder`,data);
};
export const getbuilderlist = (data) => {
    return axios.post(`${BASE_URL}/builder/geibuildlist`,data);
};
export const getuserinfo = (data) => {
    return axios.post(`${BASE_URL}/student/filtestudent`,data);
};
export const Stuimper = (data) => {
    return axios.post(`${BASE_URL}/student/stuimper`,data);
};
export const getCrm = () => {
    return axios.get(`${BASE_URL}/college/getCrm`);
};
export const getClasses = () => {
    return axios.get(`${BASE_URL}/college/getClasses`);
};
export const getBuRoom = (data) => {
    return axios.post(`${BASE_URL}/room/Stucla`,data);
};
export const getCollege = () => {
    return axios.get(`${BASE_URL}/college/getClist`);
};
export const getCravte = () => {
    return axios.get(`${BASE_URL}/cravate/getlist`);
};
export const getMajeur = () => {
    return axios.get(`${BASE_URL}/majeur/getlist`);
};
export const getCalss = () => {
    return axios.get(`${BASE_URL}/classes/getlist`);
};
export const getcollegejson = () => {
    return axios.get(`${BASE_URL}/college/getjsonlist`);
};
export const getTabJson = () => {
    return axios.get(`${BASE_URL}/college/gettablist`);
};
export const getMajeJson = () => {
    return axios.get(`${BASE_URL}/college/getCrm`);
};
export const getClassJson = () => {
    return axios.get(`${BASE_URL}/classes/getCrm`);
};
export const AddCollege = (data) => {
    return axios.post(`${BASE_URL}/college/addCollege`,data);
};
export const DeleteCollege = (data) => {
    return axios.post(`${BASE_URL}/college/deleteCollege`,data);
};
export const CanDelete = (data) => {
    return axios.post(`${BASE_URL}/college/CanDelete`,data);
};
export const updateCollege = (data) => {
    return axios.post(`${BASE_URL}/college/updateCollege`,data);
};
export const addCravate = (data) => {
    return axios.post(`${BASE_URL}/cravate/addCravate`,data);
};
export const getCollid = () => {
    return axios.get(`${BASE_URL}/college/getjsonlistid`);
};
export const editcravate = (data) => {
    return axios.post(`${BASE_URL}/cravate/EditCravate`,data);
};
export const crvisdelete = (data) => {
    return axios.post(`${BASE_URL}/cravate/isdeldete`,data);
};
export const deletecrvate = (data) => {
    return axios.post(`${BASE_URL}/cravate/deleteCrvate`,data);
};
export const getmajeuridlist = () => {
    return axios.get(`${BASE_URL}/college/getidlist`);
};
export const addMajeur = (data) => {
    return axios.post(`${BASE_URL}/majeur/addMajeur`,data);
};
export const editMajeur = (data) => {
    return axios.post(`${BASE_URL}/majeur/editMajeur`,data);
};
export const isMajeurdelete = (data) => {
    return axios.post(`${BASE_URL}/majeur/CanDelete`,data);
};
export const getClassAddjson = () => {
    return axios.get(`${BASE_URL}/college/getCrm2`);
};
export const AddClass = (data) => {
    return axios.post(`${BASE_URL}/classes/AddClass`,data);
};
export const DelClass = (data) => {
    return axios.post(`${BASE_URL}/classes/deleteClass`,data);
};
export const EditClass = (data) => {
    return axios.post(`${BASE_URL}/classes/editClass`,data);
};
export const AddBuilder = (data) => {
    return axios.post(`${BASE_URL}/builder/Add`,data);
};
export const EditBuilder = (data) => {
    return axios.post(`${BASE_URL}/builder/Edit`,data);
};
export const GetG2list = () => {
    return axios.get(`${BASE_URL}/builder/getG2list`);
};
export const getRoBusex = (data) => {
    let form = new FormData()
    form.append("sex",data)
    return axios.post(`${BASE_URL}/builder/getRoBusex`,form);
};
export const getzinfo = () =>{
    return axios.post(`${BASE_URL}/room/getzinfo`);
}
export const addroom = (data) =>{
    return axios.post(`${BASE_URL}/room/addRoom`,data);
}
export const editroom = (data) =>{
    return axios.post(`${BASE_URL}/room/editRoom`,data);
}
export const addStudent = (data) =>{
    return axios.post(`${BASE_URL}/student/add`,data);
}
export const editStudent = (data) =>{
    return axios.post(`${BASE_URL}/student/add`,data);
}


